﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserLogin.aspx.cs" Inherits="BookManageSys.UserLogin" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>用户登录</title>

    <link href="~/assert/Css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/assert/Css/custom.css" rel="stylesheet" />
    <script src="~/assert/Js/jquery.min.js"></script>
    <script src="~/assert/Js/popper.min.js"></script>
    <script src="~/assert/Js/bootstrap.min.js"></script>

    <script type="text/javascript">
        function validateForm() {
            var username = document.getElementById('<%= username.ClientID %>').value;
            var password = document.getElementById('<%= password.ClientID %>').value;

            if (username == "") {
                alert("请输入用户名！");
                return false;
            }
            if (password == "") {
                alert("请输入密码！");
                return false;
            }
            return true;
        }
    </script>
</head>
<body>

    <form id="form1" runat="server" onsubmit="return validateForm()">
        <div class="container">
            <div class="row justify-content-center" style="margin-top: 100px;">
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-header text-center">
                            <h4>用户登录</h4>
                        </div>
                        <div class="card-body">
                            <div class="form-group">
                                <label for="username">用户名</label>
                                <asp:TextBox ID="username" runat="server" CssClass="form-control" placeholder="请输入用户名"></asp:TextBox>
                            </div>
                            <div class="form-group">
                                <label for="password">密码</label>
                                <asp:TextBox ID="password" runat="server" CssClass="form-control" TextMode="Password" placeholder="请输入密码"></asp:TextBox>
                            </div>
                            <div class="form-group form-check">
                                <asp:CheckBox ID="rememberMe" runat="server" CssClass="form-check-input" />
                                <label class="form-check-label" for="rememberMe">记住我</label>
                            </div>
                            <div class="form-group text-center">
                                <asp:Button ID="btnLogin" runat="server" Text="登录" CssClass="btn btn-primary btn-block" OnClick="btnLogin_Click" />
                            </div>
                            <div class="form-group text-center">
                                <a href="/User/Register.aspx" class="btn btn-secondary btn-block">注册</a>
                            </div>
                            <div class="form-group text-center">
                                <a href="/User/ForgotPassword.aspx" class="btn btn-link">忘记密码</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>

</body>
</html>
